#include <iostream>
#include <algorithm> 
using namespace std;

int main()
{
	int n;
	cin >> n;
	int arr[1000];
	for(int i = 0; i< n; i++)
	{
		cin >> arr[i];
	}
	sort(arr, arr+n);
	
	for(int i = 0; i < n-1; i++)
	{
		if((i+1)%10==0)
		{
			cout << arr[i];
			cout << endl;
		}
		else
		{
			cout << arr[i] << "  ";
		}
	}
	cout << arr[n-1] << endl;
	return 0;
}
